# -*- coding: utf-8 -*-
# @Time : 2024/1/31 14:17
# @Author : ZH
# @File : 2760.py
# @Software: PyCharm
class Solution(object):
    def distinctDifferenceArray(self, nums):
        """
        :type nums: List[int]
        :rtype: List[int]
        """
        return [len(set(nums[:index+1])) - len(set(nums[index+1:])) for index in range(len(nums))]



if __name__ == '__main__':
    so = Solution()
    z = so.distinctDifferenceArray(nums=[3,2,3,4,2])
    print(z)
